<?php /*a:1:{s:72:"D:\project\recovery\admin\application\admin\view\common\create_list.html";i:1589006520;}*/ ?>

{extend name="common/public" /}
{block name="content"}

<div class="widget-body am-fr">
    <div class="am-form-group">
        <div class="am-btn-toolbar">
            <div class="am-btn-group am-btn-group-xs">
                <button type="button" onclick="openUrl('{:url("addrole")}')" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</button>
                <button type="button" class="am-btn am-btn-default am-btn-secondary"><span class="am-icon-save"></span> 保存</button>
                <button type="button" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-archive"></span> 审核</button>
                <button type="button" class="am-btn am-btn-default am-btn-danger"><span class="am-icon-trash-o"></span> 删除</button>
            </div>
        </div>
    </div>
</div>

<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
    <div class="widget am-cf">
        <div class="widget-head am-cf">
            <div class="widget-title am-fl">添加角色</div>
            <div class="widget-function am-fr">
                <a href="javascript:;" class="am-icon-cog"></a>
            </div>
        </div>
        <div class="widget-body  widget-body-lg am-fr">

            <table width="100%" class="am-table am-table-compact am-table-bordered tpl-table-black ">
                <thead>

                <tr>
                    <?php foreach($info as $key=>$v): 
                                if(!strstr($field,$key))continue;
                         ?>
                        <th class="am-lg-text-center">
                            <?php if(empty($v) || (($v instanceof \think\Collection || $v instanceof \think\Paginator ) && $v->isEmpty())): ?>
                            <?php echo htmlentities($key); ?>
                            <?php endif; ?>
                            <?php echo htmlentities($v); ?></th>
                    <?php endforeach; ?>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                
                    {foreach $list as $v}
                
                <tr class="gradeX">
                    <?php foreach($info as $key=>$v): 
                    if(!strstr($field,$key))continue;
                     
                            if(substr($v,0,6) =='是否'){
                         ?>
                            <td class="am-lg-text-center"> {eq name='$v.<?php echo htmlentities($key); ?>' value='1'}是{else/}否{/eq}</td>
                        <?php 
                                }else{
                                echo "<td class='am-lg-text-center'>";
                                if($key =='price'){
                                 ?>
                                {$v.<?php echo htmlentities($key); ?>*100}
                                <?php 
                                }else{
                                 ?>
                                {$v.<?php echo htmlentities($key); ?>}</td>
                        <?php }} ?>

                    <?php endforeach; ?>
                        <td>
                            
                            <div class="tpl-table-black-operation">
                                <a onclick="openUrl('{:url('edit',['id'=>$v['id']])}')">
                                    <i class="am-icon-pencil"></i> 编辑
                                </a>
                                <a href="javascript:;" class="tpl-table-black-operation-del">
                                    <i class="am-icon-trash"></i> 删除
                                </a>
                            </div>
                            
                        </td>

                </tr>
                
                    {/foreach}
                


                </tbody>
            </table>
            
                {$list|raw}
            
        </div>
    </div>
</div>

    {/block}

    {/extend}
